package com.ajx.blog.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/*
 * @Author: 姜东浩
 * @Date: 2022-04-22 23:51:51
 * 
 * @Description: 博客文章类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "article")
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "aid", type = IdType.AUTO)
    private Integer aid; // 博客文章主键id

    @TableField(value = "title")
    private String title; // 博客标题

    @TableField(value = "artimg")
    private String artimg; // 博客展示图像

    @TableField(value = "keywords")
    private String keywords; // 搜索关键字

    @TableField(value = "createtime")
    private String createtime; // 文章发布时间,数据库中是timestamp类型,插入时自动赋值

    @TableField(value = "typeid")
    private Integer typeid; // 博客类型id

    @TableField(value = "bloguid")
    private Integer bloguid; // 发布文章的用户id

    @TableField(value = "readnum")
    private Integer readnum; // 关注数量

    @TableField(value = "commentnum")
    private Integer commentnum; // 评论数量

    @TableField(value = "collnum")
    private Integer collnum; // 收藏数量

    @TableField(value = "content")
    private String content; // 文章内容

    @TableField(value = "astatus")
    private String astatus; // 状态 -1审核不通过 1 审核通过

    @TableField(value = "remark")
    private String remark; // 备注

    @TableField(exist = false)
    private Blogusers blogusers; // 博客所属用户

}
